<extend name="Public:base" />

<block name="body">
    <script type="text/javascript" src="__PUBLIC__/js/Validform_v5.3.2.js"></script>
    <div class="main-title location">
        <h2> <i>当前位置：文章 - 分类列表 - 编辑分类</i></h2>
    </div>

    <form action="{:U('update')}" method="post" class="addform">
        <div class="control-group">
            <label class="item-label"><span class="must">*</span>名称<span class="check-tips Validform_checktip"></span></label>
            <div class="controls">
                <input type="text" value="{$record.title}" name="title" class="text input-large" datatype="*" errormsg="存在特殊字符" nullmsg="分类名必须">
            </div>
        </div>
        <div class="control-group">
            <label class="item-label">描述<span class="check-tips"></span></label>
            <div class="controls">
                <label class="textarea input-large"><textarea name="content" id="content" cols="30" rows="0">{$record.content}</textarea></label>
            </div>
        </div>
        <div class="control-group">
            <label class="item-label">上级分类：<span class="check-tips"></span></label>
            <div class="controls">
                <select name="pid">
                    <option value="0">请选择</option>
                    <volist name="nav_tree" id="cate">
                        <option value="{$cate.id}"<eq name="record.pid" value="$cate.id"> selected</eq>>{$cate.title_show}</option>
                    </volist>
                </select>
                <a href="{:U('index?pid='.$record['pid'])}">返回上级</a>
            </div>
        </div>
        <div class="control-group">
            <label class="item-label">排序：<span class="check-tips"></span></label>
            <div class="controls">
                <input class="text" type="text" name="sort" value="{$record.sort}">
            </div>
        </div>
        <input type="hidden" name="id" value="{$record.id}">
        <input type="hidden" name="model" value="Cate" />
        <button type="submit" class="primary ajax-post" target-form="addform">确 定</button>
        <button onclick="javascript:history.back(-1);return false;">返 回</button>
    </form>

    <script type="text/javascript">
        $(function() {
            $(".addform").Validform({
                tiptype: 2
            });
        })
    </script>

</block>
